luci-app-attendedsysupgrade: avoid redirects, handle redirect errors
When users add an extraneous slash to the server url, then the ASU
server redirects GET requests. But, this causes an error on POST
requests as the ASU server does not redirect those, so the LuCI
client failed inappropriately with an unhandled error.
Fix both of these by first trimming trailing slashes from the server
url as it is loaded to avoid the redirects. Then, also handle all
unexpected responses, instead of just a select few.
Links: efahl/owut@
724c990d6cc0
Signed-off-by: Eric Fahlgren <[email protected]>